import time
b = open ('/home/student/Рабочий стол/Карпин Борис 8Б/m1_sorted.txt')
a = b.readlines()
a = list(map(int, a))

start1 = time.time()

for i in range(len(a)+1):
    for k in range(i+1, len(a)):
         if a[i]>a[k]:
             a[i],a[k]=a[k],a[i]

fin1 = time.time()
print(round(fin1-start1)*1000)




b = open ('/home/student/Рабочий стол/Карпин Борис 8Б/m2_reverse.txt')
a = b.readlines()
a = list(map(int, a))

start2 = time.time()

for i in range(len(a)+1):
    for k in range(i+1, len(a)):
         if a[i]>a[k]:
             a[i],a[k]=a[k],a[i]

fin2 = time.time()
print(round(fin2-start2)*1000)




b = open ('/home/student/Рабочий стол/Карпин Борис 8Б/m3_shuffle.txt')
a = b.readlines()
a = list(map(int, a))

start3 = time.time()

for i in range(len(a)+1):
    for k in range(i+1, len(a)):
         if a[i]>a[k]:
             a[i],a[k]=a[k],a[i]

fin3 = time.time()
print(round(fin3-start3)*1000)
